<?php
class C_Test extends ControllerPrimaryBasic {

    public function index () {
        $this->_newViewElement('test_list');
    }

    public function logs () {
        $logger = $this->_getLogger('test/logger');
        $logger->addStartEntry();
        $logger->addEntry('Method name: '.__METHOD__);
        $logger->addEntry('Testing logging any data', array('test' => 'test1'));
        $logger->addEntry('New Message', $this->_GET()->getAsArray());
        try {
            throw new Exception('Test exception for logger');
        } catch (Exception $e) {
            $logger->addErrorEntry($e);
        }
        $logger->addEndEntry();

        $newLogger = $this->_getLogger('test/new_logger');
        $newLogger->addStartEntry();
        $newLogger->addEntry('New log message', $this->_SERVER()->getAsArray());
        $newLogger->addEndEntry();
    }
}
